<?php
class Page extends AppModel {
    var $name = 'Page';
    
    var $order='Page.created DESC';
    
    var $actsAs = array('Tree');
    
    
    var $validate = array(
        'name' => array(
            'between' => array(
                'rule' => array('between', 5, 15),
                'message' => 'Between 5 to 15 characters'
            ),
            'unique' => array(
                'rule' => array('isUnique'),
                'message' => 'This page name already exists'
            )
        ),
        'title' => array(
            'notEmpty' => array(
                'rule' => array('notEmpty'),
                'required' => true,
                'message' => 'this field is required!'
            ),
            
        ),
        'description' => array(
            'notEmpty' => array(
                'rule' => array('notEmpty'),
                'required' => true,
                'message' => 'this field is required!'
            ),
            
        ),
        
        
              
    );
    
    
    
    
}    
?>